/*
* ============================================================================
*  Name     : GV60ListContainer.h
*  Part of  : GV60
*  Copyright: Wipo Software
* ============================================================================
*/

#ifndef GV60PHONEBOOKCONTAINER_H
#define GV60PHONEBOOKCONTAINER_H

// INCLUDES
#include <coecntrl.h>  // CCoeControl

// FORWARD DECLARATIONS
class CAknDoubleGraphicStyleListBox;   // for the listbox
class MAknsControlContext;             // for skins support
class CIconFileProvider;


// CLASS DECLARATION
class CGV60PhonebookContainer : public CCoeControl, public MCoeControlObserver
{
  public: // Constructors and destructor
    void ConstructL(const TRect& aRect);
    ~CGV60PhonebookContainer();
    CGV60PhonebookContainer(MEikListBoxObserver* n_pListBoxObserver);

  public: // New functions
    TInt GetSelectedItem();
    void UpdateListL();

  private: // Functions from base classes
    void SizeChanged();
    TInt CountComponentControls() const;
    CCoeControl* ComponentControl(TInt aIndex) const;
    void Draw(const TRect& aRect) const;
    TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
    void HandleResourceChange(TInt aType);

  private:  // from MCoeControlObserver
    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );

  private:
    void CreateIconsL();
    void CreateEmptyListL();
  
  private: //data
    CAknDoubleGraphicStyleListBox*   m_pListBox;
    MEikListBoxObserver*             m_pListBoxObserver;
    MAknsControlContext*             m_pBackGround; // for skins support

    RFs                              m_iFsSession;
    CIconFileProvider*               m_pFileProvider;
};

#endif  // GV60PHONEBOOKCONTAINER_H

// End of File
